package edu.team7.las.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the t1_employee database table.
 * 
 */
@Entity
@Table(name="t1_employee")
@NamedQuery(name="T1Employee.findAll", query="SELECT t FROM T1Employee t")
public class T1Employee implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int idEmployee;

	private String contactNo;

	private String department;

	private String designation;

	private String emailAddress;

	private String empName;

	private int reportTo;

	//bi-directional many-to-one association to T3Holiday
	@OneToMany(mappedBy="t1Employee")
	private List<T3Holiday> t3Holidays;

	//bi-directional many-to-one association to T5LeaveApplication
	@OneToMany(mappedBy="t1Employee")
	private List<T5LeaveApplication> t5LeaveApplications;

	public T1Employee() {
	}

	public int getIdEmployee() {
		return this.idEmployee;
	}

	public void setIdEmployee(int idEmployee) {
		this.idEmployee = idEmployee;
	}

	public String getContactNo() {
		return this.contactNo;
	}

	public void setContactNo(String contactNo) {
		this.contactNo = contactNo;
	}

	public String getDepartment() {
		return this.department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getDesignation() {
		return this.designation;
	}

	public void setDesignation(String designation) {
		this.designation = designation;
	}

	public String getEmailAddress() {
		return this.emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getEmpName() {
		return this.empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public int getReportTo() {
		return this.reportTo;
	}

	public void setReportTo(int reportTo) {
		this.reportTo = reportTo;
	}

	public List<T3Holiday> getT3Holidays() {
		return this.t3Holidays;
	}

	public void setT3Holidays(List<T3Holiday> t3Holidays) {
		this.t3Holidays = t3Holidays;
	}

	public T3Holiday addT3Holiday(T3Holiday t3Holiday) {
		getT3Holidays().add(t3Holiday);
		t3Holiday.setT1Employee(this);

		return t3Holiday;
	}

	public T3Holiday removeT3Holiday(T3Holiday t3Holiday) {
		getT3Holidays().remove(t3Holiday);
		t3Holiday.setT1Employee(null);

		return t3Holiday;
	}

	public List<T5LeaveApplication> getT5LeaveApplications() {
		return this.t5LeaveApplications;
	}

	public void setT5LeaveApplications(List<T5LeaveApplication> t5LeaveApplications) {
		this.t5LeaveApplications = t5LeaveApplications;
	}

	public T5LeaveApplication addT5LeaveApplication(T5LeaveApplication t5LeaveApplication) {
		getT5LeaveApplications().add(t5LeaveApplication);
		t5LeaveApplication.setT1Employee(this);

		return t5LeaveApplication;
	}

	public T5LeaveApplication removeT5LeaveApplication(T5LeaveApplication t5LeaveApplication) {
		getT5LeaveApplications().remove(t5LeaveApplication);
		t5LeaveApplication.setT1Employee(null);

		return t5LeaveApplication;
	}

}